package site.wuao.simpledesignmode.builder;

/**
 * 导演类统一组装过程
 *
 * @author wuao
 * @date 2018.04.16
 * @note -
 * ---------------------------------------------------------------------------------------------------------------------
 * @modified -
 * @date -
 * @note -
 */
public class Director {
    Builder mBuilder = null;

    public Director(Builder builder) {
        mBuilder = builder;
    }

    public Computer createComputer(String cpu, String mainboard, String ram) {
        mBuilder.buildCpu(cpu);
        mBuilder.buildMainboard(mainboard);
        mBuilder.buildRam(ram);
        return mBuilder.create();
    }
}
